Repository navigation
Run broker-backed transport tests in CI - #82
Closed
christopherread wants to merge 5 commits into
Closed
christopherread wants to merge 5 commits into
christopherread wants to merge 5 commits into
Conversation
Start RabbitMQ, NATS and Kafka as service containers and run each transport's Category=Explicit tests against them in a separate step. The NATS and Kafka tests now read NATS_URL and KAFKA_BOOTSTRAP_SERVERS (defaulting to localhost) instead of hard-coded Docker addresses, like the RabbitMQ tests' RABBITMQ_URI. Part of #74; the NetMQ tests join once #80 is merged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Setting KAFKA_GROUP_INITIAL_REBALANCE_DELAY_MS alone replaced the image defaults and the broker failed to start (missing process.roles). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Kafka test consumer starts at the latest offset and Subscribe returns before partitions are assigned, so on a fresh broker it missed the messages while __consumer_offsets was being created. Use one offsets partition and run a warm-up consumer group first. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 25, 2026
Master now runs tests on Microsoft.Testing.Platform (#101), so use --project and --filter-trait. The NetMQ tests no longer clash over ports (#80), so run them too. The broker steps now come before the unit test step, so this branch no longer edits the lines master changed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
They lose the first messages on CI runners (ZeroMQ slow joiner): the publisher socket is created on first publish and sends before subscribers have connected. Tracked separately. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 25, 2026
Owner
Author
|
Combined into #104, which includes this change as its own commit. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #74 for RabbitMQ, NATS and Kafka. The NetMQ tests stay out for now: in CI they lose their first messages (ZeroMQ slow joiner), which is tracked in #102.
Updated after #101: the broker step uses the xUnit v3 / Microsoft.Testing.Platform syntax (
dotnet test --project … -- --filter-trait "Category=Explicit"), and runs before the unit-test step so this branch doesn't touch the lines #101 changed. It merges cleanly, with no merge commits (GitVersion 6 crashes on those).Changes
rabbitmq:4.4-alpine,nats:2.15andapache/kafka:4.4.0.rabbitmq-diagnostics check_port_connectivity, becausepingreported ready before AMQP connections were accepted.KAFKA_*variable replaces the image's defaults, so the first attempt failed to start.test-topic-3and runs a short warm-up consumer group, so Kafka has created its internal__consumer_offsetstopic (1 partition here) before the tests.Subscribereturns before partitions are assigned.KAFKA_GROUP_INITIAL_REBALANCE_DELAY_MS=0).Category=Explicittests inObvs.RabbitMQ.Tests,Obvs.NATS.TestsandObvs.Kafka.Tests. The existing unit test step is unchanged.NATS_URLandKAFKA_BOOTSTRAP_SERVERS(defaulting to localhost) instead of hard-coded Docker Machine addresses, the same way RabbitMQ usesRABBITMQ_URIsince Upgrade RabbitMQ.Client 5.0.1 to 7.2.2 #69.Results (CI)
This is the first real-broker check of the Kafka 2.x and NATS 1.x upgrades from #65. Locally, the RabbitMQ tests also pass with the same filter and env var.
Not covered: ActiveMQ, because its one broker test is commented out.
Worth a separate issue: the Kafka consumer-start race affects real users too. A message published straight after subscribing can be missed until partitions are assigned. A fix would make
Subscribewait for assignment.🤖 Generated with Claude Code